<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: cy_stc_scb_i2c_config_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structcy__stc__scb__i2c__config__t.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">cy_stc_scb_i2c_config_t Struct Reference<div class="ingroups"><a class="el" href="group__group__scb.html">SCB          (Serial Communication Block)</a> &raquo; <a class="el" href="group__group__scb__i2c.html">I2C (SCB)</a> &raquo; <a class="el" href="group__group__scb__i2c__data__structures.html">Data Structures</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<div class="textblock"><p>I2C configuration structure. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:ab317c1252433320bfd76d2b8629dac23"><td class="memItemLeft" align="right" valign="top"><a id="ab317c1252433320bfd76d2b8629dac23"></a>
<a class="el" href="group__group__scb__i2c__enums.html#ga848386100a4d9700bf5bb790b3db3ed2">cy_en_scb_i2c_mode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#ab317c1252433320bfd76d2b8629dac23">i2cMode</a></td></tr>
<tr class="memdesc:ab317c1252433320bfd76d2b8629dac23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the mode of operation. <br /></td></tr>
<tr class="separator:ab317c1252433320bfd76d2b8629dac23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5051507a6a9adb8b9db39572c5f11340"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a5051507a6a9adb8b9db39572c5f11340">useRxFifo</a></td></tr>
<tr class="memdesc:a5051507a6a9adb8b9db39572c5f11340"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SCB provides an RX FIFO in hardware (consult the selected device datasheet to get the actual FIFO size).  <a href="#a5051507a6a9adb8b9db39572c5f11340">More...</a><br /></td></tr>
<tr class="separator:a5051507a6a9adb8b9db39572c5f11340"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c4bded993c3b334fbc2321952ab99f5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a2c4bded993c3b334fbc2321952ab99f5">useTxFifo</a></td></tr>
<tr class="memdesc:a2c4bded993c3b334fbc2321952ab99f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SCB provides a TX FIFO in hardware (consult the selected device datasheet to get the actual FIFO size).  <a href="#a2c4bded993c3b334fbc2321952ab99f5">More...</a><br /></td></tr>
<tr class="separator:a2c4bded993c3b334fbc2321952ab99f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e0bf167c747280bb8a1c2f4f134889b"><td class="memItemLeft" align="right" valign="top"><a id="a9e0bf167c747280bb8a1c2f4f134889b"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a9e0bf167c747280bb8a1c2f4f134889b">slaveAddress</a></td></tr>
<tr class="memdesc:a9e0bf167c747280bb8a1c2f4f134889b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The 7-bit right justified slave address, used only for the slave mode. <br /></td></tr>
<tr class="separator:a9e0bf167c747280bb8a1c2f4f134889b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3578fa3852e87ead95db3c0c13064d71"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a3578fa3852e87ead95db3c0c13064d71">slaveAddressMask</a></td></tr>
<tr class="memdesc:a3578fa3852e87ead95db3c0c13064d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">The slave address mask is used to mask bits of the slave address during the address match procedure (it is used only for the slave mode).  <a href="#a3578fa3852e87ead95db3c0c13064d71">More...</a><br /></td></tr>
<tr class="separator:a3578fa3852e87ead95db3c0c13064d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9074db87cce95b20f6adbaf905e05f98"><td class="memItemLeft" align="right" valign="top"><a id="a9074db87cce95b20f6adbaf905e05f98"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a9074db87cce95b20f6adbaf905e05f98">acceptAddrInFifo</a></td></tr>
<tr class="memdesc:a9074db87cce95b20f6adbaf905e05f98"><td class="mdescLeft">&#160;</td><td class="mdescRight">True - the slave address is accepted in the RX FIFO, false - the slave addresses are not accepted in the RX FIFO. <br /></td></tr>
<tr class="separator:a9074db87cce95b20f6adbaf905e05f98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a705499e24c5dade7143d1c339389af"><td class="memItemLeft" align="right" valign="top"><a id="a7a705499e24c5dade7143d1c339389af"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a7a705499e24c5dade7143d1c339389af">ackGeneralAddr</a></td></tr>
<tr class="memdesc:a7a705499e24c5dade7143d1c339389af"><td class="mdescLeft">&#160;</td><td class="mdescRight">True - accept the general call address; false - ignore the general call address. <br /></td></tr>
<tr class="separator:a7a705499e24c5dade7143d1c339389af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5349cece2450d79a40dbe36dda778bd7"><td class="memItemLeft" align="right" valign="top"><a id="a5349cece2450d79a40dbe36dda778bd7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a5349cece2450d79a40dbe36dda778bd7">enableWakeFromSleep</a></td></tr>
<tr class="memdesc:a5349cece2450d79a40dbe36dda778bd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">When set, the slave will wake the device from Deep Sleep on an address match (the device datasheet must be consulted to determine which SCBs support this mode) <br /></td></tr>
<tr class="separator:a5349cece2450d79a40dbe36dda778bd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1414232f520fb70d07f67218c627a586"><td class="memItemLeft" align="right" valign="top"><a id="a1414232f520fb70d07f67218c627a586"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a1414232f520fb70d07f67218c627a586">enableDigitalFilter</a></td></tr>
<tr class="memdesc:a1414232f520fb70d07f67218c627a586"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables a digital 3-tap median filter to be applied to the inputs of filter glitches on the lines. <br /></td></tr>
<tr class="separator:a1414232f520fb70d07f67218c627a586"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b742ccfd88a2a9216e9ad7b018a6d51"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a8b742ccfd88a2a9216e9ad7b018a6d51">lowPhaseDutyCycle</a></td></tr>
<tr class="memdesc:a8b742ccfd88a2a9216e9ad7b018a6d51"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of SCB clock cycles in the low phase of SCL.  <a href="#a8b742ccfd88a2a9216e9ad7b018a6d51">More...</a><br /></td></tr>
<tr class="separator:a8b742ccfd88a2a9216e9ad7b018a6d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a275201ed69def1d0e7432eef35cfd64c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcy__stc__scb__i2c__config__t.html#a275201ed69def1d0e7432eef35cfd64c">highPhaseDutyCycle</a></td></tr>
<tr class="memdesc:a275201ed69def1d0e7432eef35cfd64c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of SCB clock cycles in the high phase of SCL.  <a href="#a275201ed69def1d0e7432eef35cfd64c">More...</a><br /></td></tr>
<tr class="separator:a275201ed69def1d0e7432eef35cfd64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Field Documentation</h2>
<a id="a5051507a6a9adb8b9db39572c5f11340"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5051507a6a9adb8b9db39572c5f11340">&#9670;&nbsp;</a></span>useRxFifo</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cy_stc_scb_i2c_config_t::useRxFifo</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The SCB provides an RX FIFO in hardware (consult the selected device datasheet to get the actual FIFO size). </p>
<p>The useRxFifo field defines how the driver firmware reads data from the RX FIFO:</p><ul>
<li>If this option is enabled, the hardware is configured to automatically ACK incoming data, and interrupt is enabled to take data out of the RX FIFO when it has some number of bytes (typically, when it is half full).</li>
<li>If this option is disabled, the interrupt is enabled to take data out of the RX FIFO when a byte is available. Also, hardware does not automatically ACK the data. Firmware must tell the hardware to ACK the byte (so each byte requires interrupt processing). <br />
 <b>Typically, this option should be enabled</b> to configure hardware to automatically ACK incoming data. Otherwise hardware might not get the command to ACK or NACK a byte fast enough, and clock stretching is applied (the transaction is delayed) until the command is set. When this option is enabled, the number of interrupts required to process the transaction is significantly reduced because several bytes are handled at once. <br />
 <b>However, there is a side effect:</b></li>
<li>For master mode, the drawback is that the master may receive more data than desired due to the interrupt latency. An interrupt fires when the second-to-last byte has been received. This interrupt tells the hardware to stop receiving data. If the latency of this interrupt is longer than one transaction of the byte on the I2C bus, then the hardware automatically ACKs the following bytes until the interrupt is serviced or the RX FIFO becomes full.</li>
<li>For slave mode, the drawback is that the slave only NACKs the master when the RX FIFO becomes full, NOT when the slave write firmware buffer becomes full. <br />
 In either master or slave mode, all received extra bytes are dropped. <dl class="section note"><dt>Note</dt><dd>The useRxFifo option is not available if acceptAddrInFifo is true. </dd></dl>
</li>
</ul>

</div>
</div>
<a id="a2c4bded993c3b334fbc2321952ab99f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c4bded993c3b334fbc2321952ab99f5">&#9670;&nbsp;</a></span>useTxFifo</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cy_stc_scb_i2c_config_t::useTxFifo</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The SCB provides a TX FIFO in hardware (consult the selected device datasheet to get the actual FIFO size). </p>
<p>The useTxFifo option defines how the driver firmware loads data into the TX FIFO:</p><ul>
<li>If this option is enabled, the TX FIFO is fully loaded with data and the interrupt is enabled to keep the TX FIFO loaded until the end of the transaction.</li>
<li>If this option is disabled, a single byte is loaded into the TX FIFO and the interrupt enabled to load the next byte when the TX FIFO becomes empty (so each byte requires interrupt processing). <br />
 <b>Typically, this option should be enabled</b> to keep the TX FIFO loaded with data and reduce the probability of clock stretching. When there is no data to transfer, clock stretching is applied (the transaction is delayed) until the data is loaded. When this option is enabled, the number of interrupts required to process the transaction is significantly reduced because several bytes are handled at once. <br />
 <b>The drawback of enabling useTxFifo</b> is that the abort operation clears the TX FIFO. The TX FIFO clear operation also clears the shift register. As a result the shifter may be cleared in the middle of a byte transaction, corrupting it. The remaining bits to transaction within the corrupted byte are complemented with 1s. If this is an issue, then do not enable this option. </li>
</ul>

</div>
</div>
<a id="a3578fa3852e87ead95db3c0c13064d71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3578fa3852e87ead95db3c0c13064d71">&#9670;&nbsp;</a></span>slaveAddressMask</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t cy_stc_scb_i2c_config_t::slaveAddressMask</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The slave address mask is used to mask bits of the slave address during the address match procedure (it is used only for the slave mode). </p>
<p>Bit 0 of the address mask corresponds to the read/write direction bit and is always a do not care in the address match therefore must be set 0. Bit value 0 - excludes bit from address comparison. Bit value 1 - the bit needs to match with the corresponding bit of the I2C slave address. </p>

</div>
</div>
<a id="a8b742ccfd88a2a9216e9ad7b018a6d51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b742ccfd88a2a9216e9ad7b018a6d51">&#9670;&nbsp;</a></span>lowPhaseDutyCycle</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t cy_stc_scb_i2c_config_t::lowPhaseDutyCycle</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of SCB clock cycles in the low phase of SCL. </p>
<p>Only applicable in master modes. The valid range is 7 to 16. </p>

</div>
</div>
<a id="a275201ed69def1d0e7432eef35cfd64c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a275201ed69def1d0e7432eef35cfd64c">&#9670;&nbsp;</a></span>highPhaseDutyCycle</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t cy_stc_scb_i2c_config_t::highPhaseDutyCycle</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of SCB clock cycles in the high phase of SCL. </p>
<p>Only applicable in master modes. The valid range is 5 to 16. Please refer to the section <a class="el" href="group__group__scb__i2c.html#group_scb_i2c_mclk_sync">I2C Master Clock Synchronization</a> for more information. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
